#ifndef GAMEDIALOG_H
#define GAMEDIALOG_H

#include <QGraphicsObject>
#include <QEventLoop>
#include "gameanimation.h"



class GameDialogButton : public QGraphicsObject{
    Q_OBJECT
public:
    GameDialogButton(QGraphicsObject* parent = 0);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    static const int BUTTON_WIDTH = 60;
    static const int BUTTON_HEIGHT = 25;
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
signals:
    void pressed();
};

class GameDialog : public QGraphicsObject
{
    Q_OBJECT
public:
    GameDialog(QGraphicsItem* parent = 0);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    int exec();
    static const int DIALOG_WIDTH = 200;
    static const int DIALOG_HEIGHT = 120;
protected:

    QEventLoop* e;
    GameDialogButton* acceptButton;
    GameDialogButton* rejectButton;

protected slots:
    void accept();
    void reject();
};


class ActionGuideDialog : public QGraphicsObject
{
    Q_OBJECT
public:
    ActionGuideDialog(QGraphicsObject* parent, const QString&);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    static ActionGuideDialog* getObject();
    void setGuideText(QString text);

protected:
    static const int GUIDEBAR_HEIGHT = 40;
    QString displayText;
    static ActionGuideDialog* g;
};

#endif // GAMEDIALOG_H
